﻿using Serilog;
using Serilog.Core;
using Serilog.Events;

namespace Proxy
{
    public class SerilogHandle
    {
        /// <summary>
        /// 系统日志
        /// </summary>
        public static Logger Logger_System = new LoggerConfiguration().WriteTo.File("logs\\System-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// 自动扫码
        /// </summary>
        public static Logger Logger_AutoScanner = new LoggerConfiguration().WriteTo.File("logs\\AutoScanner-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// 手动扫码
        /// </summary>
        public static Logger Logger_ManualScanner = new LoggerConfiguration().WriteTo.File("logs\\ManualScanner-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// CSV处理
        /// </summary>
        public static Logger Logger_DealWithCsv = new LoggerConfiguration().WriteTo.File("logs\\DealWithCsv-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// PLC日志
        /// </summary>
        public static Logger Logger_Plc = new LoggerConfiguration().WriteTo.File("logs\\Plc-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// PLC日志
        /// </summary>
        public static Logger Logger_CT015 = new LoggerConfiguration().WriteTo.File("logs\\CT015-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// PLC日志
        /// </summary>
        public static Logger Logger_MIFBC010 = new LoggerConfiguration().WriteTo.File("logs\\BC010-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// PLC日志
        /// </summary>
        public static Logger Logger_M1H330L = new LoggerConfiguration().WriteTo.File("logs\\M1H330L-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// PLC日志
        /// </summary>
        public static Logger Logger_M1H330R = new LoggerConfiguration().WriteTo.File("logs\\M1H330R-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// PLC日志
        /// </summary>
        public static Logger Logger_CT020 = new LoggerConfiguration().WriteTo.File("logs\\CT020-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// 数据库日志
        /// </summary>
        public static Logger Logger_Search = new LoggerConfiguration().WriteTo.File("logs\\Search-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// 数据库日志
        /// </summary>
        public static Logger Logger_Modify = new LoggerConfiguration().WriteTo.File("logs\\Modify-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
        /// <summary>
        /// 数据库日志
        /// </summary>
        public static Logger Logger_Delete = new LoggerConfiguration().WriteTo.File("logs\\Delete-.txt", LogEventLevel.Verbose, "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj}{NewLine}{Exception}", null, 1073741824L, null, buffered: false, shared: false, null, RollingInterval.Day, rollOnFileSizeLimit: false, 31).CreateLogger();
    }
}
